export default {
    setgoodslist(state, payload) {
        state.goodslist = payload
    },
    setgoodsTitle(state, payload) {
        state.goodsTitle = payload
    },
    setgoodsinfo(state, payload) {
        state.goodsinfo = payload
    },
    setgoodscount(state, payload) {
        //获取对象，可以随意传值
        for (var key in payload) {
            state.page[key]= payload[key]
        }
        state.page.totalPage = Math.ceil(state.page.total / state.page.size)
    },
    seteditor(state, payload) {
        state.editor = payload
    }
}